import { createRouter, createWebHistory } from 'vue-router'

import HomeView from '../views/HomeView.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'home',
      component: HomeView,
      redirect: '/customCascader',
      children: []
    },
    {
      path: '/about',
      name: 'about',
      component: () => import('../views/AboutView.vue')
    },
    {
      path: '/customCascader',
      component: () => import('../components/CustomCascader.vue')
    },
    {
      path: '/upload',
      component: () => import('@/views/FileView.vue')
    },
    {
      path: '/other/xterm',
      component: () => import('@/views/xterm/Xterm.vue')
    },
    {
      path: '/other/callback',
      component: () => import('@/views/callback/CallbackInfoView.vue')
    }
  ]
})

export default router
